package com.example.springbootmybatis.mapper;

import com.example.springbootmybatis.pojo.Department;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author 星空 岳先生
 * @name
 * @date 2022-08-21 16:57
 */

@Mapper
@Repository
public interface DepartmentMapper {

    // 获取所有部门信息
    List<Department> getDepartments();

    //通过id获取部门
    Department getDepartment(Integer id);

    // 新增一个部门
    int addDepartment(Department department);

    // 更改一个部门
    int updateDepartment(Department department);

    // 删除一个部门
    int deleteDepartment(Integer id);

}
